﻿using System;
using System.ServiceModel.Activation;
using System.Web;
using System.Web.Routing;

namespace Evince.Service
{
    public class Global : HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes();
        }

        private void RegisterRoutes()
        {
            RouteTable.Routes.Add(new ServiceRoute("Employees", new WebServiceHostFactory(), typeof(EmployeeService)));
            RouteTable.Routes.Add(new ServiceRoute("Accounts", new WebServiceHostFactory(), typeof(AccountService)));
            RouteTable.Routes.Add(new ServiceRoute("Attendances", new WebServiceHostFactory(), typeof(AttendanceService)));
            RouteTable.Routes.Add(new ServiceRoute("Homes", new WebServiceHostFactory(), typeof(HomeService)));
            RouteTable.Routes.Add(new ServiceRoute("LeaveRequests", new WebServiceHostFactory(), typeof(LeaveRequestService)));
            RouteTable.Routes.Add(new ServiceRoute("NewsAndEvents", new WebServiceHostFactory(), typeof(NewsAndEventService)));
            RouteTable.Routes.Add(new ServiceRoute("PageTemplates", new WebServiceHostFactory(), typeof(PageTemplateService)));
            RouteTable.Routes.Add(new ServiceRoute("UserRoles", new WebServiceHostFactory(), typeof(UserRoleService)));
        }
    }
}